<template>
  <span @click="toggleScreenFull">全屏</span>
</template>
<script>
import ScreenFull from 'screenfull'
export default {
    data() {
        return {}
    },
    methods: {
        toggleScreenFull() {
            if (!ScreenFull.isEnabled) {
                return this.$message.warning('此时不可全屏')
            }
            ScreenFull.toggle()
        }
    }
}
</script>
<style lang="scss" scoped>
span {
    margin: 0 20px;
    cursor: pointer;
    vertical-align: top
}
</style>
